import { AppProps, Container, Events } from "@/components/custom/index.tsx";
import {
  definitionInput,
  definitionMonacoEditor,
} from "@/components/custom/incident";
import ChartPie from "@/components/echarts/pie/chartPie.vue";
export default {
  type: "chart",
  label: "饼图",
  description: "饼图",
  hidden: false,
  isform: false,
  draggable: true,
  icon: () => <icon-bg-colors />,
  preview: () => {
    return <ChartPie />;
  },
  render: (props: any, { style }: Container, app: AppProps) => {
    return <ChartPie {...props} style={style}></ChartPie>;
  },
  props: {
    modelValue: definitionInput({
      type: "string",
      label: "默认值",
      placeholder: "请输入内容",
      defaultValue: "",
    }),
  },
  events: {
    onChange: definitionMonacoEditor({
      type: "string",
      label: "值改变时触发",
      defaultValue: "",
    }),
    onPopupVisibleChange: definitionMonacoEditor({
      type: "string",
      label: "下拉框显示状态改变时触发",
      defaultValue: "",
    }),
  },
  style: {
    width: "300px",
    height: "300px",
  },
} as Container;
